#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @time     : 2018/2/22 14:52
# @Author   : BYF
# file      : MyTest.py
# @version  :


import unittest, os, sys
from common import function
from page.login_page import LoginPage
sys.path.append("..")


class BaseTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.function = function
        # 选择浏览器驱动
        cls.driver = cls.function.browser()
        # 设置隐示等待
        cls.driver.implicitly_wait(30)

    def setUp(self):
        file_path = os.path.dirname(os.path.dirname(__file__)) + "/common/config.ini"
        self.config = self.function.get_config(file_path)
        print("Start Test")

    def tearDown(self):
        print("End Test")

    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()
